use crate::handlers;

use super::{
    error::ApiError,
    response::{ApiResponse, PageRes},
};

pub type R2D2Pool = r2d2::Pool<redis::Client>;

pub use handlers::user_handler as UserHandler;

pub type ApiResult<T> = Result<ApiResponse<T>, ApiError>;
pub type ApiBoolResult = Result<ApiResponse<bool>, ApiError>;
pub type ApiListResult<T> = Result<ApiResponse<Vec<T>>, ApiError>;
pub type ApiPageResult<T> = Result<ApiResponse<PageRes<T>>, ApiError>;
